Current Location: Home> Function Categories> hypot

hypot

Calculate the oblique length of a straight triangle
Name:hypot
Category:math
Programming Language:php
One-line Description:Calculate the length of the beveled edge of a right triangle.

Definition and usage

hypot() function calculates the length of the oblique side of a straight triangle.

Example

 <?php
echo hypot ( 2 , 3 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 1 , 3 ) ;
?>

Try it yourself

grammar

 hypot ( x , y )
parameter describe
x Required. The length of the edge x.
y Required. The length of the edge y.

illustrate

hypot() function will calculate the length of the oblique side according to the two straight solution edge lengths x and y of a right triangle. Or the distance from punctuation point (x, y) to the origin. The algorithm of this function is equivalent to sqrt(x*x + y*y).

Similar Functions
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Hyperbolic sine sinh

    sinh

    Hyperbolicsine
  • Arctangle of two parameters atan2

    atan2

    Arctangleoftwoparame
  • Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero. expm1

    expm1

    Returnsexp(number)-1
  • Sine sin

    sin

    Sine
  • Convert decimal to octal decoct

    decoct

    Convertdecimaltoocta
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
Popular Articles